<?php

namespace app\common\validate;

class ServiceValidate extends BaseValidate
{
    /**
     * 验证规则
     */
    protected $field = [
        'service_name'            => '服务项目名称',
        'service_tips'            => '服务项目简介',
        'service_benchmark_price' => '服务项目基准价格',
        'service_time'            => '服务预计耗时',
        'service_cover_url'       => '服务项目封面',
        'service_banner'          => '服务项目轮播图',
        'service_desc'            => '服务详情',
        'service_remark'          => '购买须知',
        'is_delete'               => '删除;',

    ];

    /**
     * 验证场景
     */
    protected $scene = [
        'index'  => [
            'service_name',
            'is_delete'
        ],
        'save'   => [
            'service_name'            => 'require',
            'service_tips'            => 'require',
            'service_period'             => 'require|arrayHasOnlyInts',
            'service_skill_level'           => 'require|arrayHasOnlyInts',
            'service_cover_url'       => 'require',
            'service_desc'            => 'require',
        ],
        'update' => [
            "service_id"              => 'require|integer',
            'service_name',
            'service_skill_level'           => 'require|arrayHasOnlyInts',
            'service_cover_url'       => 'require',
            'service_desc'            => 'require',
        ],
        'delete' => [],
        'read'   => []
    ];

    /**
     * 提示消息
     */
    protected $message = [

    ];


}
